import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/index"
  },
  {
    path: "/index",
    name: "Index",
    component: () => import("@/views/index/index")
  },
  {
    path: "/stayTuned",
    name: "StayTuned",
    component: () => import("@/views/my/stayTuned")
  },
  {
    path: "/doctor",
    name: "doctor",
    component: () => import("@/views/my/doctor")
  },
  {
    path: "/doctors",
    name: "Doctors",
    component: () => import("@/views/doctors")
  },
  {
    path: "/detail",
    name: "doctorDetail",
    component: () => import("@/views/doctors/detail")
  },
  {
    path: "/myStayTuned",
    name: "myStayTuned",
    component: () => import("@/views/my/myStayTuned")
  },
  {
    path: "/doctorlist",
    name: "DoctorList",
    component: () => import("@/views/index/doctorlist")
  },
  {
    path: "/payment",
    name: "Payment",
    component: () => import("@/views/pay/payment")
  },
  {
    path: "/paysuccess",
    name: "paysuccess",
    component: () => import("@/views/pay/paysuccess")
  },
  {
    path: "/payfail",
    name: "payfail",
    component: () => import("@/views/pay/payfail")
  },
  {
    path: "/order",
    name: "Order",
    component: () => import("@/views/order/index")
  },
  {
    path: "/introduction",
    name: "introduction",
    component: () => import("@/views/index/introduction")
  },
  {
    path: "/departments",
    name: "departments",
    component: () => import("@/views/index/departments")
  },
  {
    path: "/newVisitor",
    name: "newVisitor",
    component: () => import("@/views/order/newVisitor")
  },
  {
    path: "/editVisitor",
    name: "editVisitor",
    component: () => import("@/views/order/editVisitor")
  },
  {
    path: "/introduction",
    name: "introduction",
    component: () => import("@/views/index/introduction")
  },
  {
    path: "/chooseVisitor",
    name: "chooseVisitor",
    component: () => import("@/views/order/chooseVisitor")
  },
  {
    path: "/appointment",
    name: "appointment",
    component: () => import("@/views/appointment/appointment")
  },
  {
    path: "/registrationDetails",
    name: "registrationDetails",
    component: () => import("@/views/appointment/registrationDetails")
  },
  {
    path: "/purchasingServices",
    name: "purchasingServices",
    component: () => import("@/views/pay/purchasingServices")
  },
  {
    path: "/myPrescription",
    name: "myPrescription",
    component: () => import("@/views/prescription/myPrescription")
  },
  {
    path: "/prescriptionList",
    name: "prescriptionList",
    component: () => import("@/views/prescription/prescriptionList")
  }
];
const router = new VueRouter({
  base: process.env.BASE_URL,
  routes
});

export default router;
